package io.renren.modules.generator.enums;

/**
 * @ClassName GasCatalogEnum
 * @Description 烟气监测指标枚举类
 * @Author zhengd
 * @Date 2020/9/11 21:19
 * @Version 1.0
 **/
public enum GasCatalogEnum {

    O2(1,"氧气"),
    GAS_TEMPERATURE(2,"烟气温度"),
    GAS_PRESSUER(3,"烟气压力"),
    GAS_SPEED(4,"烟气流速"),
    GAS_HUMIDITY(5,"烟气湿度"),
    SO2(6,"二氧化硫"),
    NITROGEN_OXIDES(7,"氮氧化物"),
    DUST(8,"粉尘"),
    OTHER(-1,"其他");

    /**
     * 代号
     */
    private int code;

    /**
     * 说明
     */
    private String message;

    GasCatalogEnum(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String message(int code){
        for (GasCatalogEnum statusEnum : GasCatalogEnum.values()) {
            if (statusEnum.getCode() == code) {
                return statusEnum.getMessage();
            }
        }
        return OTHER.getMessage();
    }
}
